<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>绑定属性</title>
    <style>
        .my{
            border:1px solid red;
        }
    </style>

</head>
<body>
    <div id="div">
        <!--v-bin可以省略的-->
        <a v-bind:href="url">百度一下</a>
        <a :href="url">百度一下</a>
        <!--绑定样式-->
        <div :class="cls">我是div</div>
    </div>
</body>
<script src="../js/vue.js"></script>
<script>
    new Vue({
        el:"#div",
        data:{
            url:"https://www.baidu.com",
            cls:"my"
        }
    })
</script>
</html>